﻿#include"AVLTree.h"

int main()
{
	int a[] = { 4, 2, 6, 1, 3, 5, 15, 7, 16, 14 };

	AVLTree<int, int> t;
	for (auto& e : a)
	{
		t.Insert(make_pair(e, e));
	}

	clock_t start, finish;
	start = clock();
	
	if (t.IsBalance2())
		cout << "平衡的" << endl;
	else
		cout << "不平衡的" << endl;
	
	finish = clock() - start;

	cout << ((float)finish) / CLOCKS_PER_SEC << endl;


	return 0;
}

